export default class AppConfig {

    static Debug: boolean = true;

    /**游戏版本号 */
    static version: string = "1.0.0";

    /**正式服地址 */
    static AppUrl: string = "";

    /**正式服资源地址 */
    static AppResUrl: string = "";

    /**测试服地址 */
    static AppUrl_d: string = "";

    /**测试服资源地址 */
    static AppresUrl_d: string = "";

    /**打印日志地址 */
    static GameLogUrl: string = "";


    /**服务器地址 */
    static get API(): string {
        let api = AppConfig.Debug ? AppConfig.AppUrl_d : AppConfig.AppUrl;
        Reflect.defineProperty(AppConfig, "API", {
            enumerable: false,
            configurable: false,
            get() {
                return api
            }
        });
        return api
    }

    /**资源cdn地址 */
    static get URL(): string {
        let url = AppConfig.Debug ? AppConfig.AppresUrl_d : AppConfig.AppResUrl;
        Reflect.defineProperty(AppConfig, "URL", {
            enumerable: false,
            configurable: false,
            get() {
                return url;
            }
        });
        return url
    }

    static RES_URL: string = AppConfig.URL + "images/";
    static HEAD_PATH: string = AppConfig.URL + "headImg/";
    static BONE_PATH: string = AppConfig.URL + "boneAnim/{0}.sk";
    static BONE_MONSTER_PATH: string = AppConfig.URL + "boneAnim/enemy/{0}.sk";

    static SOUND_END = ".mp3";

    /** 声音路径 */
    static SOUND_PATH: string = "musics/{0}" + AppConfig.SOUND_END;

    /** 排行榜排名图片路径 */
    static RANK_PATH: string = "images/rank/cell_top{0}.png";

    /** 功能按钮图片路径 */
    static SYSTEM_BTN_PATH: string = "images/hall/{0}.png";

}